package com.lxc.demos.util.c2dm;


import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Helper class to handle BroadcastReciver behavior.
 * - can only run for a limited amount of time - it must start a real service
 * for longer activity
 * -must get the power lock,must make sure it's released when all done.
 * 处理BroadcastReciver过程 
 * @author Shineflag
 *
 */
public class C2DMBroadcastReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		//To keep things in one place.
		Log.d(C2DMConfig.TAG,"C2DMBroadcastReceiver.onReceive.intent.action="+intent.getAction());
		C2DMBaseReceiver.runIntentInService(context, intent);
		setResult(Activity.RESULT_OK,null,null);

	}

}
